﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using VisionCloud.Core.Model.Enums.Schedule;

namespace VisionCloud.Core.Model.Schedule
{
    [Table("RsWorkOrder")]
    public class RsWorkOrder : BaseEntity
    {
        [Key]
        public Guid Id { get; set; }

        /// <summary>
        /// 设备Id
        /// </summary>
        public Guid? DeviceId { get; set; }

        /// <summary>
        /// 排查系统租户Id
        /// </summary>
        public string BpsTenantId { get; set; }

        /// <summary>
        /// 排查系统工单Id
        /// </summary>
        public string BpsTaskId { get; set; }

        /// <summary>
        /// 排查系统任务类型-FMS定义机器人类型
        /// </summary>
        public string BpsTaskType { get; set; }

        /// <summary>
        /// 排查系统备注
        /// </summary>
        public string BpsTaskRemark { get; set; }

        /// <summary>
        /// 项目编码
        /// </summary>
        public string ProjectId { get; set; }

        /// <summary>
        /// 项目名称
        /// </summary>
        public string ProjectName { get; set; }

        /// <summary>
        /// 楼栋编号
        /// </summary>
        public string BuildingCode { get; set; }

        /// <summary>
        /// 楼栋名称
        /// </summary>
        public string BuildingName { get; set; }

        /// <summary>
        /// 楼层编号
        /// </summary>
        public string FloorCode { get; set; }

        /// <summary>
        /// 楼层名称
        /// </summary>
        public string FloorName { get; set; }

        /// <summary>
        /// 工序编号
        /// </summary>
        public string ProcedureCode { get; set; }

        /// <summary>
        /// 是否整层作业，默认非整层
        /// </summary>
        public bool WholeFloor { get; set; }

        /// <summary>
        /// 机器人类别：0:其他机器人、1:装修机器人
        /// </summary>
        public int? RobotClass { get; set; }

        /// <summary>
        /// 负责人列表，多个
        /// </summary>
        public string ChargeUserList { get; set; }

        /// <summary>
        /// 负责人BIM账号
        /// </summary>
        public string UserAccount { get; set; }

        /// <summary>
        /// 计划开始时间
        /// </summary>
        public DateTime StartTime { get; set; }

        /// <summary>
        /// 计划结束时间
        /// </summary>
        public DateTime EndTime { get; set; }

        /// <summary>
        /// 工单状态: 0:未分配、1:未开始、2:已开始,进行中、3:已完成
        /// </summary>

        public WorkOrderStatusEnum Status { get; set; }

        /// <summary>
        /// 经度坐标（精确小数点后6位）
        /// </summary>
        public double Longitude { get; set; }

        /// <summary>
        /// 纬度坐标（精确小数点后6位）
        /// </summary>
        public double Latitude { get; set; }

        /// <summary>
        /// 省份
        /// </summary>
        public string Province { get; set; }

        /// <summary>
        /// 城市
        /// </summary>
        public string City { get; set; }

        /// <summary>
        /// 区/县/乡镇
        /// </summary>
        public string Town { get; set; }

        /// <summary>
        /// 来源类型：1内部FMS，2公司创建（默认为1）
        /// </summary>
        public int? SourceType { get; set; }

        /// <summary>
        /// 是否测试工单：true是，false否
        /// </summary>
        public bool IsTestTask { get; set; }
    }
}
